home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / usr_-_Usr_Files / INCLUDE / TERMIOS.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  3KB  |  112 lines

  1. /* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3.  
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public License as
  6. published by the Free Software Foundation; either version 2 of the
  7. License, or (at your option) any later version.
  8.  
  9. The GNU C Library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12. Library General Public License for more details.
  13.  
  14. You should have received a copy of the GNU Library General Public
  15. License along with the GNU C Library; see the file COPYING.LIB.  If
  16. not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
  17. Cambridge, MA 02139, USA.  */
  18.  
  19. /*
  20.  *    POSIX Standard: 7.1-2 General Terminal Interface    <termios.h>
  21.  */
  22.  
  23. #ifndef _TERMIOS_H
  24. #define _TERMIOS_H
  25.  
  26. #include <features.h>
  27. #include <sys/types.h>
  28. #include <linux/termios.h>
  29.  
  30. __BEGIN_DECLS
  31.  
  32. #ifdef __SVR4_I386_ABI_L1__
  33. #define CTRL(ch)    ((ch)&0x1F)
  34. #define    IBSHIFT        16
  35.  
  36. #define CNUL    0
  37. #define CDEL    0177
  38. #define CESC    '\\'
  39. #define CINTR    0177
  40. #define CQUIT    034
  41. #define CERASE    '#'
  42. #define CKILL    '@'
  43. #define CEOT    04
  44. #define CEOL    0
  45. #define CEOL2    0
  46. #define CEOF    4
  47. #define CSTART    021
  48. #define CSTOP    023
  49. #define CSWTCH    032
  50. #define NSWTCH    0
  51. #define CSUSP    CTRL('Z')
  52. #define CDSUSP    CTRL('Y')
  53. #define CRPRNT    CTRL('R')
  54. #define CFLUSH    CTRL('O')
  55. #define CWERASE    CTRL('W')
  56. #define CLNEXT    CTRL('V')
  57.  
  58. #endif /* __SVR4_I386_ABI_L1__ */
  59.  
  60.  
  61. /* Return the input baud rate stored in *TERMIOS_P.  */
  62. extern speed_t cfgetispeed __P ((struct termios *__termios_p));
  63.  
  64. /* Return the output baud rate stored in *TERMIOS_P.  */
  65. extern speed_t cfgetospeed __P ((struct termios *__termios_p));
  66.  
  67.  
  68. /* Set *T to indicate raw mode.  */
  69. extern void cfmakeraw  __P ((struct termios *__t));
  70.  
  71. /* Set the input baud rate stored in *TERMIOS_P to SPEED.  */
  72. extern int cfsetispeed __P ((struct termios *__termios_p,
  73.         speed_t __speed));
  74.  
  75. /* Set the output baud rate stored in *TERMIOS_P to SPEED.  */
  76. extern int cfsetospeed __P ((struct termios *__termios_p,
  77.         speed_t __speed));
  78.  
  79.  
  80. /* Wait for pending output to be written on FILDES.  */
  81. extern int tcdrain __P ((int __fildes));
  82.  
  83. /* Suspend or restart transmission on FILDES.
  84.    Values for ACTION (TC[IO]{OFF,ON}) are in <linux/termios.h>.  */
  85. extern int tcflow __P ((int __fildes, int __action));
  86.  
  87. /* Flush pending data on FILDES.
  88.    Values for QUEUE_SELECTOR (TC{I,O,IO}FLUSH) are in <linux/termios.h>.  */
  89. extern int tcflush __P ((int __fildes, int __queue_selector));
  90.  
  91. /* Return the foreground process group ID of FILDES.  */
  92. extern pid_t tcgetpgrp __P ((int __fildes));
  93.  
  94. /* Put the state of FD into *TERMIOS_P.  */
  95. extern int tcgetattr __P ((int __fildes, struct termios *__termios_p));
  96. extern int __tcgetattr __P ((int __fildes, struct termios *__termios_p));
  97.  
  98. /* Send zero bits on FILDES.  */
  99. extern int tcsendbreak __P ((int __fildes, int __duration));
  100.  
  101. /* Set the state of FILDES to *TERMIOS_P.
  102.    Values for OPTIONAL_ACTIONS (TCSA*) are in <linux/termios.h>.  */
  103. extern int tcsetattr __P ((int __fildes, int __optional_actions,
  104.     struct termios *__termios_p));
  105.  
  106. /* Set the foreground process group ID of FILDES set PGRP_ID.  */
  107. extern int tcsetpgrp __P ((int __fildes, pid_t __pgrp_id));
  108.  
  109. __END_DECLS
  110.  
  111. #endif
  112.